package com.tweetbook.entity.Account;


public class AccountFactory {
	
	
	public AccountFactory getAccountFactory(){
		return new AccountFactory();
	}
	
	public void createAccount(String email,String passwd,String name){
		Account acc = new Account();
		acc.setEmail(email);
		acc.setName(name);
		acc.setPasswd(passwd);
		acc.addAccount(name, passwd, email);		
	}
	
	public int checkAccount(String loginid,String passwd){
		int error =0;
		Account acc = new Account();
		acc.setEmail(loginid);
		acc.setPasswd(passwd);
		acc.checkAcount();
		if(acc.getAccount_id()>0){
			error=1;
		}
		return error;
	}
}
